package com.stu.service.impl;

import com.github.pagehelper.Page;
import com.stu.bean.Images;
import com.stu.bean.Invitation;
import com.stu.bean.InvitationExample;
import com.stu.mapper.ImagesMapper;
import com.stu.mapper.InvitationMapper;
import com.stu.service.ImagesService;
import com.stu.service.InvitationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InvitationServiceImpl implements InvitationService {
    @Autowired
    private InvitationMapper invitationMapper;

    public Page<Invitation> selectInvitation(Invitation invitation) {

        return invitationMapper.selectAllInvitation(invitation);
    }

    public int deleteInvitation(int iId) {

        return invitationMapper.deleteByPrimaryKey(iId);
    }

    public int selectInvitationCount() {
        InvitationExample invitationExample=new InvitationExample();
        return invitationMapper.selectByExample(invitationExample).size();
    }

//    public Images insert(Images images) {
//        return null;
//    }
}
